<#include "/public/macro.html">
<form method="post" key="set-mine" enctype="multipart/form-data" action="/admin/config/save.html" class="layui-form">
	<#if systemConfig??><input type="hidden" name="id" value="${systemConfig.id!''}"></#if>
	<div class="row">
		<div class="col-lg-12">
			<div class="ukefu-customer-div setting-wrapper">
				<div class="box default-box">
					<div class="box-header">
						<h3 class="box-title">系统设置</h3>
					</div>
					<div class="box-body ukefu-im-theme">
						<div class="row">
							<div class="col-lg-8">
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">1、系统颜色风格选择</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>优客服系统界面颜色风格</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">默认的配色是绿色，选择颜色可以在右侧预览风格，点击保存即可生效</p>
											</div>
											<div class="col-lg-4">
												<select name="theme" lay-filter="sysconfig">
													<option value="01" <#if systemConfig?? && systemConfig.theme?? && systemConfig.theme == '01'>selected="selected"</#if>>绿色</option>
													<option value="02" <#if systemConfig?? && systemConfig.theme?? && systemConfig.theme == '02'>selected="selected"</#if>>黑色</option>
													<option value="03" <#if systemConfig?? && systemConfig.theme?? && systemConfig.theme == '03'>selected="selected"</#if>>蓝色</option>
												</select>
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">2、请填写服务器的访问地址</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>服务器的访问地址，包含端口。</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">后台访问静态资源时需要使用</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="iconstr" value="<#if systemConfig.iconstr?? && systemConfig.iconstr!= ''>${systemConfig.iconstr!''}<#else>uk.ukefu.cn</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
										<div class="row" style="padding-top:10px;">
											<div class="col-lg-8">
												<p>语音播报的文件访问地址</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">
												输入语音播报的文件访问地址</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="voiceaddr" value="<#if systemConfig.voiceaddr?? && systemConfig.voiceaddr!= ''>${systemConfig.voiceaddr!''}</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">3、产品登录界面和后台管理界面标题</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>登录页和产品后台页面显示标题</p>
												
											</div>
											<div class="col-lg-4" style="text-align:right;position: relative;">
												<input type="text" name="title" value="${systemConfig.title!'UCKeFu-全渠道客服系统'}" autocomplete="off" class="layui-input">
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">4、登录页欢迎Logo图片</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>登录页显示的Logo图片，建议尺寸220*60。</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">
													<span class="ukefu-logo">
														<img src="<#if systemConfig?? && systemConfig.loginlogo?? && systemConfig.loginlogo != ''>/res/image.html?id=${systemConfig.loginlogo?url}<#else>/images/logo2.png</#if>" style="max-width:<#if systemConfig.loginlogowidth??>${systemConfig.loginlogowidth}<#else>220</#if>px;max-height:<#if systemConfig.loginlogoheight??>${systemConfig.loginlogoheight}<#else>60</#if>px;">
													</span>
												</p>
											</div>
											<div class="col-lg-4" style="text-align:right;position: relative;">
												<div class="layui-input-block">
													<div class="layui-box layui-upload-button">
														<input type="file" name="loginlogo" accept="image/gif, image/jpeg, image/png" lay-ext="jpg|png|gif"  class="layui-upload-file" onchange="$('#logo_img').html($(this).val());">
														<span class="layui-upload-icon"><i class="layui-icon"></i>上传图片</span>
													</div>
												</div>
												<div id="logo_img" style="position:absolute;right: 20px;"></div>	
											</div>
										</div>
										<#if systemConfig?? && systemConfig.loginlogo?? && systemConfig.loginlogo != ''>
										<div class="row" style="margin-top:20px;">
											<div class="col-lg-4">
												<p>登录页Logo图片最大宽度</p>
											</div>
											<div class="col-lg-1" style="text-align:right;position: relative;">
												<input type="text" name="loginlogowidth" value="${systemConfig.loginlogowidth!'220'}" autocomplete="off" class="layui-input">
											</div>
											<div class="col-lg-1" style="text-align:right;position: relative;">
											</div>
											<div class="col-lg-5">
												<p>登录页Logo图片最大高度</p>
											</div>
											<div class="col-lg-1" style="text-align:right;position: relative;">
												<input type="text" name="loginlogoheight" value="${systemConfig.loginlogoheight!'60'}" autocomplete="off" class="layui-input">
											</div>
										</div>
										</#if>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">5、产品后台管理界面Logo图片</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>后台首页显示的Logo图片，建议尺寸280*80。</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">
													<div class="ukefu-console-logo <#if systemConfig?? && systemConfig.theme?? && systemConfig.theme == '01'>ukefu-system-theme1</#if><#if systemConfig?? && systemConfig.theme?? && systemConfig.theme == '02'>ukefu-system-theme2</#if><#if systemConfig?? && systemConfig.theme?? && systemConfig.theme == '03'>ukefu-system-theme3</#if>" style="width:280px;height:80px;padding:5px;">
														<img src="<#if systemConfig?? && systemConfig.consolelogo?? && systemConfig.consolelogo != ''>/res/image.html?id=${systemConfig.consolelogo?url}<#else>/images/logo.png</#if>" style="max-width:<#if systemConfig.consolelogowidth??>${systemConfig.consolelogowidth}<#else>220</#if>px;max-height:<#if systemConfig.consolelogoheight??>${systemConfig.consolelogoheight}<#else>80</#if>px;">
													</div>
												</p>
											</div>
											<div class="col-lg-4" style="text-align:right;position: relative;">
												<div class="layui-input-block">
													<div class="layui-box layui-upload-button">
														<input type="file" name="consolelogo" accept="image/gif, image/jpeg, image/png" lay-ext="jpg|png|gif"  class="layui-upload-file" onchange="$('#consolelogo_img').html($(this).val());">
														<span class="layui-upload-icon"><i class="layui-icon"></i>上传图片</span>
													</div>
												</div>
												<div id="consolelogo_img" style="position:absolute;right: 20px;"></div>	
											</div>
										</div>
										<#if systemConfig?? && systemConfig.consolelogo?? && systemConfig.consolelogo != ''>
										<div class="row" style="margin-top:20px;">
											<div class="col-lg-4">
												<p>后台首页Logo图片最大宽度</p>
											</div>
											<div class="col-lg-1" style="text-align:right;position: relative;">
												<input type="text" name="consolelogowidth" value="${systemConfig.consolelogowidth!'280'}" autocomplete="off" class="layui-input">
											</div>
											<div class="col-lg-1" style="text-align:right;position: relative;">
											</div>
											<div class="col-lg-4">
												<p>后台首页Logo图片最大高度</p>
											</div>
											<div class="col-lg-2" style="text-align:right;position: relative;">
												<input type="text" name="consolelogoheight" value="${systemConfig.consolelogoheight!'80'}" autocomplete="off" class="layui-input">
											</div>
										</div>
										</#if>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">6、产品标题栏缩略小图</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>产品登录页和后台管理页面的标题栏小缩略图，文件扩展名是ico格式</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">
													<div class="ukefu-console-logo" style="width:140px;height:40px;padding:5px;">
														<img src="<#if systemConfig?? && systemConfig.favlogo?? && systemConfig.favlogo != ''>/res/image.html?id=${systemConfig.favlogo?url}<#else>/images/favicon.ico</#if>" style="height:40px;">
													</div>
												</p>
											</div>
											<div class="col-lg-4" style="text-align:right;position: relative;">
												<div class="layui-input-block">
													<div class="layui-box layui-upload-button">
														<input type="file" name="favlogo" accept="image/ico, image/gif, image/jpeg, image/png" lay-ext="jpg|png|gif"  class="layui-upload-file" onchange="$('#favlogo_img').html($(this).val());">
														<span class="layui-upload-icon"><i class="layui-icon"></i>上传图片</span>
													</div>
												</div>
												<div id="favlogo_img" style="position:absolute;right: 20px;"></div>	
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">7、对话服务和系统集群状态</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-12">
												<p>Netty SocketIO服务，服务端口：${webimport} , 状态：<#if imServerStatus?? && imServerStatus == true><small class="ukefu-label theme4">服务中</small><#else><small class="ukefu-label theme4" style="background-color:#FF5722;">已停止</small></#if></p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">建议通过界面停止或启动对话服务，避免出现端口被占用的问题</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">当前服务器在集群中的信息：<br/>${cluster!''}</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">当前服务器在集群中是否主节点：${master!'false'}</p>
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">9、启用其他功能组件</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>启用权限数据采集功能后，会进入数据采集模式,当前状态：<#if infoace?? && infoace == true><small class="ukefu-label theme4">已启用</small><#else><small class="ukefu-label theme4" style="background-color:#FF5722;">已关闭</small></#if></p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">启用后，在优客服界面上的任何链接点击操作都会触发数据收集功能</p>
											</div>
											<div class="col-lg-4">
												<#if infoace?? && infoace == true>
													<a href="/admin/auth/infoacq.html" target="parent" class="layui-btn layui-btn-sm layui-btn-danger">退出数据采集功能</a>
												<#else>
													<a href="/admin/auth/infoacq.html" target="parent" class="layui-btn layui-btn-sm">进入数据采集功能</a>
												</#if>		
											</div>
										</div>
										<div class="row" style="margin-top:40px;">
											<div class="col-lg-8">
												<p>1、启用智能监控功能</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">智能监控可以查看的当前坐席服务状态</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												    <input type="checkbox" title="启用" name="monitor" value="1" <#if models?? && models["monitor"]?? && models["monitor"] == true>checked="checked"</#if>>
												</div>	
											</div>
										</div>
										
										<div class="row" style="margin-top:20px;">
											<div class="col-lg-8">
												<p>2、启用数据报表功能</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">允许开发和发布统计数据报表</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												    <input type="checkbox" title="启用" name="report" value="1" <#if models?? && models["report"]?? && models["report"] == true>checked="checked"</#if>>
												</div>	
											</div>
										</div>
										
										<div class="row" style="margin-top:20px;">
											<div class="col-lg-8">
												<p>3、启用验证码登录</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">在登录页面上显示验证码</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												    <input type="checkbox" title="启用" name="vcode" value="1" <#if systemConfig?? && systemConfig.vcode == true>checked="checked"</#if>>
												</div>	
											</div>
										</div>
										
										<div class="row" style="margin-top:20px;">
											<div class="col-lg-8">
												<p>4、启用七天自动登陆</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">首次登陆后，七天内自动登录</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												    <input type="checkbox" title="启用" name="remember" value="1" <#if systemConfig?? && systemConfig.remember == true>checked="checked"</#if>>
												</div>	
											</div>
										</div>
										<#if models?? && models["callcenter"]?? && models["callcenter"] == true>
										<div class="row" style="margin-top:20px;">
											<div class="col-lg-8">
												<p>5、启用实时语音转写</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">开启实时语音转写，在电话弹屏界面中显示</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												    <input type="checkbox" title="启用" lay-filter="channelshare" name="asr" value="1" <#if systemConfig?? && systemConfig.asr == true>checked="checked"</#if>>
												</div>	
											</div>
										</div>
										<!-- 
										<div class="row" id="channelshare_tip" style="margin-top:20px;<#if !(systemConfig??) || systemConfig.asr == false>display:none;</#if>">
											<div class="col-lg-8">
												<p>6、实时语音转写共享电话消息通道</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">实时语音转写和软电话条共享消息通道</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												    <input type="checkbox" title="启用" name="channelshare" value="1" <#if systemConfig?? && systemConfig.channelshare == true>checked="checked"</#if>>
												</div>	
											</div>
										</div>
										 -->
										</#if>
										<#if models?? && models["multitenant"]?? && models["multitenant"] == true>
										<div class="row" style="margin-top:20px;">
											<div class="col-lg-8">
												<p>6、启用扩展功能</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												    <input type="checkbox" title="启用"  name="enabletneant" value="1" <#if systemConfig?? && systemConfig.enabletneant == true>checked="checked"</#if>>
												</div>	
											</div>
										</div>
										
										</#if>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">10、修改微信接收消息的日志级别</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>动态修改微信接收消息的日志级别</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">默认是INFO，调整到DEBUG能够方便微信消息排查错误</p>
											</div>
											<div class="col-lg-4">
												<select name="loglevel" lay-filter="sysconfig">
													<option value="info" <#if systemConfig?? && systemConfig.loglevel?? && systemConfig.loglevel == 'debug'>selected="selected"</#if>>INFO</option>
													<option value="debug" <#if systemConfig?? && systemConfig.loglevel?? && systemConfig.loglevel == 'debug'>selected="selected"</#if>>DEBUG</option>
												</select>
											</div>
										</div>
									</div>
								</div>
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">11、启用服务SSL安全访问</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>启用SSL安全协议</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">启用后需要上传SSL证书和设置SSL证书密码</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="checkbox" title="启用" name="enablessl" lay-filter="enablessl" value="1" <#if systemConfig.enablessl>checked="checked"</#if>>
											</div>
										</div>
										<div class="row httpsconfig" style="margin-top:20px;<#if systemConfig.enablessl == false>display:none;</#if>">
											<div class="col-lg-8">
												<p>
													JKS证书文件
													<span style="color:red;font-weight:bold;">${systemConfig.jksfile!''}</span>
												</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">受信的SSL证书文件，请上传.JKS类型的证书文件
													
												</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<span id="jkstip"></span>
												<div class="layui-box layui-upload-button">
													<input type="file" name="keyfile" accept=".jks" lay-ext="jks"  class="layui-upload-file" onchange="$('#jkstip').html($(this).val());">
													<span class="layui-upload-icon"><i class="layui-icon"></i>上传JKS文件</span>
												</div>
											</div>
										</div>
										<div class="row httpsconfig" style="margin-top:20px;<#if systemConfig.enablessl == false>display:none;</#if>">
											<div class="col-lg-8">
												<p>JKS证书密码</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">.JKS文件的证书密码，<b style="color:red;font-weight:bold;">如无改变，不用填写</b></p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="password" name="jkspassword" value="" autocomplete="off" class="layui-input">
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">12、启用涉及重要操作的二次验证密码</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>启用重要操作的二次密码验证</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">启用后重启服务器、关闭对话服务器和修改证书等操作将会进行二次安全验证</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="checkbox" title="启用" name="enable" lay-filter="enable" value="1" <#if secret?? && secret.enable>checked="checked"</#if>>
											</div>
										</div>
										<#if secret?? && secret.enable == true>
										<div class="row elablesec" style="margin-top:20px;<#if secret?? && secret.enable == true><#else>display:none;</#if>">
											<div class="col-lg-8">
												<p>已设定的旧的密码</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">请填写已经保存的旧的密码，提交后会验证旧密码是否正确</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="password" name="oldpass" id="oldpass" value="" autocomplete="off" class="layui-input">
											</div>
										</div>
										</#if>
										<div class="row elablesec" style="margin-top:20px;<#if secret?? && secret.enable == true><#else>display:none;</#if>">
											<div class="col-lg-8">
												<p>安全操作的二次验证新密码</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">首次设置密码无需验证旧密码</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="password" name="password" id="password" value="" autocomplete="off" class="layui-input">
											</div>
										</div>
										<div class="row elablesec" style="margin-top:20px;<#if secret?? && secret.enable == true><#else>display:none;</#if>">
											<div class="col-lg-8">
												<p>再次确认安全操作的二次验证新密码</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;"><b style="color:red;font-weight:bold;">请保证新密码两次输入相同	</b></p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="password" name="repassword" id="repassword" value="" lay-verify="pass" autocomplete="off" class="layui-input">
											</div>
										</div>
									</div>
								</div>
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">13、百度地图的Key代码（AK）</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>用于调用百度地图的API</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">需要使用的API包括坐标转换和Javascript接口</p>
											</div>
											<div class="col-lg-4">
												<input type="text" name="mapkey" value="${systemConfig.mapkey!''}" autocomplete="off" class="layui-input">
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">14、启用权限控制</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>系统菜单的权限控制</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">默认不启用权限控制，如果选择启用，用户需要授权才能访问需要授权的系统菜单功能，系统管理员账号（admin）不受控制</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="checkbox" title="启用" name="auth" value="1" <#if systemConfig.auth>checked="checked"</#if>>
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">15、启用联系人号码点击拨号功能</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>点击联系人电话号码自动拨号</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">开启后语音平台能够从系统模板中的配置信息读取配置文件，具备热更新能力</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="checkbox" title="启用" name="callout" <#if systemConfig?? && systemConfig.callout == true>checked="checked"</#if>>
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">16、启用工单系统的邮件通知</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>工单在流转到达的时候是否发送邮件通知</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">开启后工单状态变更的时候，会发送</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="checkbox" title="启用" name="enablemail" lay-filter="email" <#if systemConfig?? && systemConfig.enablemail == true>checked="checked"</#if>>
											</div>
										</div>
									</div>
									<div class="box-item" id="email" style="position: relative;<#if systemConfig?? && systemConfig.enablemail == true><#else>display:none;</#if>">
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>a、发送邮件的服务器</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">选用发送邮件的邮件服务器配置信息</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="emailid">
												     	<option value="">请选择邮件服务器...</option>
												     	<#if sysMessageList??>
												     	<#list sysMessageList as server>
												        <option value="${server.id!''}" <#if systemConfig.emailid?? && server.id == systemConfig.emailid>selected="selected"</#if>>${server.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>b、默认邮件模板</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">发送邮件的时候，默认使用的邮件模板</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="emailworkordertp">
												     	<option value="">请选择邮件模板...</option>
												     	<#if workOrderList??>
												     	<#list workOrderList as template>
												        <option value="${template.id!''}" <#if systemConfig.emailworkordertp?? && template.id == systemConfig.emailworkordertp>selected="selected"</#if>>${template.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>c、创建工单的邮件模板</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">创建工单的时候，发送给发起人的邮件模板</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="mailcreatetp">
												     	<option value="">请选择邮件模板...</option>
												     	<#if workOrderList??>
												     	<#list workOrderList as template>
												        <option value="${template.id!''}" <#if systemConfig.mailcreatetp?? && template.id == systemConfig.mailcreatetp>selected="selected"</#if>>${template.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>d、工单有状态改变的模板</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">工单的状态发生改变时候，发送给当前处理人的邮件模板</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="mailupdatetp">
												     	<option value="">请选择邮件模板...</option>
												     	<#if workOrderList??>
												     	<#list workOrderList as template>
												        <option value="${template.id!''}" <#if systemConfig.mailupdatetp?? && template.id == systemConfig.mailupdatetp>selected="selected"</#if>>${template.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>e、工单有状态变更的时候发送邮件给创建人</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">工单的状态发生改变时候，发送给工单状态变更邮件给创建人</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="checkbox" title="启用" name="emailtocreater" <#if systemConfig?? && systemConfig.emailtocreater == true>checked="checked"</#if>>
												</div>	
											</div>
										</div>
										
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>f、工单有状态变更的时候发送给创建人的邮件模板</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">工单的状态发生改变时候，发送给工单创建人的邮件模板</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="emailtocreatertp">
												     	<option value="">请选择邮件模板...</option>
												     	<#if workOrderList??>
												     	<#list workOrderList as template>
												        <option value="${template.id!''}" <#if systemConfig.emailtocreatertp?? && template.id == systemConfig.emailtocreatertp>selected="selected"</#if>>${template.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>g、工单邮件是否显示邮件收件人名称</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">工单邮件是否显示邮件收件人名称</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="checkbox" title="启用" name="emailshowrecipient" <#if systemConfig?? && systemConfig.emailshowrecipient== true>checked="checked"</#if>>
												</div>	
											</div>
										</div>
										
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">17、启用短信发送功能</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>启用系统发送短信功能</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">开启后在业务功能中出现短信发送按钮</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="checkbox" title="启用" name="enablesms" lay-filter="sms" <#if systemConfig?? && systemConfig.enablesms == true>checked="checked"</#if>>
											</div>
										</div>
									</div>
									<div class="box-item" id="sms" style="position: relative;<#if systemConfig?? && systemConfig.enablesms == true><#else>display:none;</#if>">
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>a、发送短信的网关</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">选用发送短信的网关服务器配置信息</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="smsid">
												     	<option value="">请选择短信网关...</option>
												     	<#if smsMessageList??>
												     	<#list smsMessageList as server>
												        <option value="${server.id!''}" <#if systemConfig.smsid?? && server.id == systemConfig.smsid>selected="selected"</#if>>${server.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										<#if models?? && models["callcenter"]?? && models["callcenter"] == true>
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>b、通话挂机短信模板</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">呼叫中心通话结束以后发送的短信内容模板</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="smshugup">
												     	<option value="">请选择挂机短信模板...</option>
												     	<#if hugupSmsList??>
												     	<#list hugupSmsList as smshugup>
												        <option value="${smshugup.id!''}" <#if systemConfig.smshugup?? && smshugup.id == systemConfig.smshugup>selected="selected"</#if>>${smshugup.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>c、呼入未接听短信模板</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">呼入未接听发送的短信内容模板</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="smsnoanswer">
												     	<option value="">请选择挂机短信模板...</option>
												     	<#if callInSmsList??>
												     	<#list callInSmsList as noanswer>
												        <option value="${noanswer.id!''}" <#if systemConfig.smsnoanswer?? && noanswer.id == systemConfig.smsnoanswer>selected="selected"</#if>>${noanswer.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>d、呼出未接听短信模板</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">呼出未接听发送的短信内容模板</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="smsorgnoanswer">
												     	<option value="">请选择挂机短信模板...</option>
												     	<#if callOutSmsList??>
												     	<#list callOutSmsList as smsorgnoanswer>
												        <option value="${smsorgnoanswer.id!''}" <#if systemConfig.smsorgnoanswer?? && smsorgnoanswer.id == systemConfig.smsorgnoanswer>selected="selected"</#if>>${smsorgnoanswer.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										
										<div class="row" style="margin-bottom:20px;" id="numsms">
											<div class="col-lg-12">
												<p>d、按号码 
													<a href="javascript:void(0)" class="layui-btn layui-btn-sm green" id="addnum" style="float: right;">
														添加号码<i class="layui-icon"></i>  
													</a>
												</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">按号码使用不同短信模板</p>
											</div>
											<div class="row col-lg-12" id="numsmshead" <#if (numsmstplList??&& numsmstplList?size ==0) || !numsmstplList??>style="display: none;"</#if>>
												<div class="col-lg-3" >号码：</div>
												<div class="col-lg-3" >通话挂机短信模板：</div>
												<div class="col-lg-3" >呼入未接听短信模板：</div>
												<div class="col-lg-3" >呼出未接听短信模板：</div>
											</div>
											<#if numsmstplList?? && numsmstplList?size gt 0>
												<#list numsmstplList as numsmstpl>
													<div class="row col-lg-12 numrow">
														<div class="col-lg-3" ><div class="layui-input-block"><input type="text" name="numbers" lay-verify="number" value="${numsmstpl.number}" autocomplete="off" class="layui-input" style="width:180px;float: left;"><a href="javascript:void(0)" class="delnums" style="float: right;"><i class="layui-icon" style="color:red;font-size: 21px;line-height: 36px;">&#xe640;</i></a></div>	</div>
														<div class="col-lg-3" ><div class="layui-input-block"><select name="numsmshugup"><option value="">请选择通话挂机短信模板...</option><#if hugupSmsList??><#list hugupSmsList as smshugup><option value="${smshugup.id!''}" <#if numsmstpl.smshugup?? && numsmstpl.smshugup==smshugup.id>selected="selected"</#if>>${smshugup.name!''}</option></#list></#if></select></div></div>
														<div class="col-lg-3" ><div class="layui-input-block"><select name="numnoanswer"><option value="">请选择呼入未接听短信模板...</option><#if callInSmsList??><#list callInSmsList as noanswer><option value="${noanswer.id!''}" <#if numsmstpl.noanswer?? && numsmstpl.noanswer==noanswer.id>selected="selected"</#if>>${noanswer.name!''}</option></#list></#if></select></div></div>
														<div class="col-lg-3" ><div class="layui-input-block"><select name="numsmsorgnoanswer"><option value="">请选择呼出未接听短信模板...</option><#if callOutSmsList??><#list callOutSmsList as smsorgnoanswer><option value="${smsorgnoanswer.id!''}" <#if numsmstpl.smsorgnoanswer?? && numsmstpl.smsorgnoanswer==smsorgnoanswer.id>selected="selected"</#if>>${smsorgnoanswer.name!''}</option></#list></#if></select></div></div>
													</div>
												</#list>
											</#if>
										</div>
										</#if>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">18、启用日志存储到数据库</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>同步存储日志到数据库</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">默认禁用此项功能，启用后，日志存储在uk_log表</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="checkbox" title="启用" name="savelog" value="1" <#if systemConfig.savelog>checked="checked"</#if>>
											</div>
										</div>
									</div>
								</div>
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">19、启用集群支持功能</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>启用数据通信的集群支持功能，启用分布式消息处理组件</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">默认禁用此项功能，启用后，集群功能可用（含会话共享）</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="checkbox" title="启用" name="enabledis" value="1" <#if systemConfig?? && systemConfig.enabledis>checked="checked"</#if>>
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">20、服务器访问IP白名单</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>白名单控制功能，从语音服务器访问的时候，进行地址校验</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">启用白名单后，从语言服务器访问当前服务器需要增加IP白名单</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="text" name="whitelistip" value="<#if systemConfig.whitelistip?? && systemConfig.whitelistip!= ''>${systemConfig.whitelistip!''}</#if>" autocomplete="off" class="layui-input">
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">21、选择SocketIO默认通信协议</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>选择通信协议，默认通信协议是WebSocket和Polling</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">可以单独选择WebSocket或Polling</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<select name="transports">
													<option value="default" <#if !(systemConfig.transports?? && (systemConfig.transports== 'websocket' || systemConfig.transports== 'polling'))>selected="selected"</#if>>默认</option>
													<option value="websocket" <#if systemConfig.transports?? && systemConfig.transports== 'websocket'>selected="selected"</#if>>WebSocket</option>
													<option value="polling" <#if systemConfig.transports?? && systemConfig.transports== 'polling'>selected="selected"</#if>>Polling</option>
												</select>
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">22、启用XSS请求过滤</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>默认关闭，启用后，所有的HTTP请求都会针对请求参数做XSS过滤</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">默认禁用此项功能，启用后，部分包含HTML请求的功能可能会不正常</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="checkbox" title="启用" name="cleanxss" value="1" <#if systemConfig?? && systemConfig.cleanxss>checked="checked"</#if>>
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">23、启用审计日志预警功能</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>启用系统审计日志预警功能</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">开启后在审计日志发现异常时进行预警</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="checkbox" title="启用" name="enablereqlogwarning" lay-filter="enablereqlogwarning" <#if systemConfig?? && systemConfig.enablereqlogwarning == true>checked="checked"</#if>>
											</div>
										</div>
									</div>
									<div class="box-item" id="enablereqlogwarning" style="position: relative;<#if systemConfig?? && systemConfig.enablereqlogwarning == true><#else>display:none;</#if>">
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>接收预警用户</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">被选中的用户可接收短信或邮件预警</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												    <select id="reqlogwarningtouser" name="reqlogwarningtouser" lay-ignore style="width: 100%;" multiple=”multiple”>
													<#list userList.content as user>
												  	<option value="${user.id!''}" <#if systemConfig.reqlogwarningtouser?? && systemConfig.reqlogwarningtouser?split(",")?seq_contains(user.id)>selected="selected"</#if>>${user.username!}</option>
												  	</#list>
													</select>
												</div>	
											</div>
										</div>
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>a、发送短信的网关</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">选用发送短信的网关服务器配置信息</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="reqlogwarningsmsid">
												     	<option value="">请选择短信网关...</option>
												     	<#if smsMessageList??>
												     	<#list smsMessageList as server>
												        <option value="${server.id!''}" <#if systemConfig.reqlogwarningsmsid?? && server.id == systemConfig.reqlogwarningsmsid>selected="selected"</#if>>${server.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>b、发送短信的模板</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">发送短信的时候，默认使用的短信模板</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="reqlogwarningsmstp">
												     	<option value="">请选择短信模板...</option>
												     	<#if reqlogsmstpList??>
												     	<#list reqlogsmstpList as template>
												        <option value="${template.id!''}" <#if systemConfig.reqlogwarningsmstp?? && template.id == systemConfig.reqlogwarningsmstp>selected="selected"</#if>>${template.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>c、发送邮件的服务器</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">选用发送邮件的邮件服务器配置信息</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="reqlogwarningemailid">
												     	<option value="">请选择邮件服务器...</option>
												     	<#if sysMessageList??>
												     	<#list sysMessageList as server>
												        <option value="${server.id!''}" <#if systemConfig.reqlogwarningemailid?? && server.id == systemConfig.reqlogwarningemailid>selected="selected"</#if>>${server.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>d、默认邮件模板</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">发送邮件的时候，默认使用的邮件模板</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="reqlogwarningemailtp">
												     	<option value="">请选择邮件模板...</option>
												     	<#if reqlogemailtpList??>
												     	<#list reqlogemailtpList as template>
												        <option value="${template.id!''}" <#if systemConfig.reqlogwarningemailtp?? && template.id == systemConfig.reqlogwarningemailtp>selected="selected"</#if>>${template.name!''}</option>
												        </#list>
												        </#if>
												      </select>
												</div>	
											</div>
										</div>
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-12">
												<p>e、拦截动作</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">添加触发预警的拦截动作：请选择预警级别、预警类型、拦截动作，不选择拦截动作则默认“仅预警”</p>
											</div>
										</div>
										<div class="row" style="margin-bottom:10px;">
											<div class="col-lg-12">
												<div class="layui-inline" style="width: 120px;">
													<select id="warnlv" name="warnlv" lay-filter="warnlv">
													<#if warnDicList?? && warnDicList?size gt 0>
														<#list warnDicList as warnlv>
															<#if warnlv.parentid==warnlv.dicid>
																<option value="${warnlv.id}" data-color="${warnlv.iconskin!''}">${warnlv.name!''}</option>
															</#if>
														</#list>
													</#if>
													</select>
												</div>
												<div class="layui-inline" style="width: 220px;margin-left: 5px;">
													<select id="warn" name="warn" >
														<#if warnDicList?? && warnDicList?size gt 0>
															<#list warnDicList as warnlv>
																<#if warnlv.parentid==warnlv.dicid>
																	<#list warnDicList as warnlvv>
																		<#if warnlvv.parentid==warnlv.id>
																			<option value="${warnlvv.id}" >${warnlvv.name!''}</option>
																		</#if>
																	</#list>
																	<#break>
																</#if>
															</#list>
														</#if>
													</select>
												</div>	
												<div class="layui-inline" style="margin-top: 5px;">
													<#if actionList?? && actionList?size gt 0>
														<#list actionList as action>
															<input type="checkbox" name="warnaction" value="${action.id!''}" title="${action.name!''}" >
														</#list>
													</#if>
													<a href="javascript:void(0)" class="layui-btn layui-btn-sm green" id="warnadd">
														添加<i class="layui-icon">&#xe61f;</i>  
													</a>
												</div>	
											</div>
										</div>
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-12" id="actwarn">
												<#if systemConfig?? && systemConfig.reqlogwarningaction?? && systemConfig.reqlogwarningaction!='' >
													<#assign json=systemConfig.reqlogwarningaction?eval />	
													<#list json as action>
														<small class="ukefu-timerange layui-btn "
															style="background-color:<#if warnDicList?? && warnDicList?size gt 0><#list warnDicList as warn><#if warn.id==action.warnid><#list warnDicList as warndic><#if warndic.id==warn.parentid>${warndic.iconskin!''}!important</#if></#list></#if></#list></#if>;">
														<#if warnDicList?? && warnDicList?size gt 0>
														<#list warnDicList as warn>
															<#if warn.id==action.warnid>
															${warn.name!''}:
																<#if action.actionid?? && action.actionid!=''>
																	<#list action.actionid?split(",") as actionid>
																		<#if actionList?? && actionList?size gt 0>
																			<#list actionList as act>
																				<#if act.id==actionid><#if actionid_index != 0>、</#if>${act.name!''}</#if>
																			</#list>
																		</#if>
																	</#list>
																<#else>
																仅预警
																</#if>
															</#if>
														</#list>
														</#if>
														<i class="layui-icon">&#x1006;</i>
														<input type="hidden" name="reqlogwarningaction" value="${action.warnid!''}:${action.actionid!''}" data-warn="${action.warnid!''}">
														</small>
													</#list>											
												</#if>
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">24、TTS服务平台</div>
									<div class="box-item">
										<div class="row" style="margin-bottom:20px;">
											<div class="col-lg-8">
												<p>将文字信息转化为音频信息</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">默认是未配置，选择语音服务平台，点击保存即可生效</p>
											</div>
											<div class="col-lg-4">
												<select name="ttsservice" lay-filter="ttsservice">
													<option value="" >尚未配置</option>
													<option value="xunfei" <#if systemConfig?? && systemConfig.ttsservice?? && systemConfig.ttsservice == 'xunfei'>selected="selected"</#if>>讯飞</option>
												</select>
											</div>
										</div>
										<div class="row xunfeitts" style="margin-bottom:20px; <#if systemConfig?? && systemConfig.ttsservice?? && systemConfig.ttsservice == 'xunfei'><#else>display: none;</#if>" >
											<div class="col-lg-8">
												<p>应用APPID</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">必须为webapi类型应用，并开通语音合成服务。</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="xunfeittsappid" value="<#if systemConfig.xunfeittsappid?? && systemConfig.xunfeittsappid!= ''>${systemConfig.xunfeittsappid!''}</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
										<div class="row xunfeitts" style="margin-bottom:20px; <#if systemConfig?? && systemConfig.ttsservice?? && systemConfig.ttsservice == 'xunfei'><#else>display: none;</#if>" >
											<div class="col-lg-8">
												<p>接口密钥APIKey</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">webapi类型应用开通合成服务后，控制台--我的应用---语音合成---相应服务的apikey。</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="xunfeittsapikey" value="<#if systemConfig.xunfeittsapikey?? && systemConfig.xunfeittsapikey!= ''>${systemConfig.xunfeittsapikey!''}</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
										<div class="row xunfeitts" style="margin-bottom:20px; <#if systemConfig?? && systemConfig.ttsservice?? && systemConfig.ttsservice == 'xunfei'><#else>display: none;</#if>" >
											<div class="col-lg-8">
												<p>接口密钥APISecret</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">webapi类型应用开通合成服务后，控制台--我的应用---语音合成---相应服务的apiSecret。</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="xunfeittsapisecret" value="<#if systemConfig.xunfeittsapisecret?? && systemConfig.xunfeittsapisecret!= ''>${systemConfig.xunfeittsapisecret!''}</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
										<div class="row xunfeitts" style="margin-bottom:20px; <#if systemConfig?? && systemConfig.ttsservice?? && systemConfig.ttsservice == 'xunfei'><#else>display: none;</#if>" >
											<div class="col-lg-8">
												<p>发音人参数</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">webapi类型应用开通合成服务后，控制台--我的应用---语音合成---发音人管理---添加发音人--修改发音人参数。</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="xunfeittsvoicename" value="<#if systemConfig.xunfeittsvoicename?? && systemConfig.xunfeittsvoicename!= ''>${systemConfig.xunfeittsvoicename!''}</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
									</div>
								</div>
								<#if models?? && models["callcenter"]?? && models["callcenter"] == true>
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">25、启用实时语音听写（转写）功能</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>用于实时语音质检、坐席智能助手等功能</p>
											</div>
											<div class="col-lg-4" style="text-align:right;position: relative;">
												<input type="checkbox" title="启用" name="asr" lay-filter="asr" value="1" <#if systemConfig.asr>checked="checked"</#if>>
											</div>
										</div>
										
										<div class="row asr" style="margin-top:30px;margin-bottom:20px;  <#if systemConfig?? && systemConfig.asr == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>语音听写（转写）识别服务的类型和厂商</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">注意：部分厂商提供的语音识别引擎只支持8KHz</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="asrtype">
												     	<option value="xfiat" <#if systemConfig?? && systemConfig.asrtype?? && systemConfig.asrtype=="xfiat">selected="selected"</#if>>讯飞云语音听写（流式版）</option>
												     	<!-- <option value="xfasr" <#if systemConfig?? && systemConfig.asrtype?? && systemConfig.asrtype=="xfasr">selected="selected"</#if>>讯飞云实时语音转写</option> -->
												     </select>
												</div>	
											</div>
										</div>
										
										<div class="row asr" style="margin-bottom:20px; <#if systemConfig?? && systemConfig.asr == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>应用服务器请求地址</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">语音听写（转写）服务访问地址</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="asrhost" value="<#if systemConfig.asrhost?? && systemConfig.asrhost!= ''>${systemConfig.asrhost!''}</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
										
										<div class="row asr" style="margin-top:30px;margin-bottom:20px;  <#if systemConfig?? && systemConfig.asr == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>识别语音的编码采样频率</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">语音听写（转写）服务服务请求地址</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <select name="asrcoderate">
												     	<option value="8000" <#if systemConfig?? && systemConfig.asrcoderate?? && systemConfig.asrcoderate=="8000">selected="selected"</#if>>8KHz</option>
												     	<option value="16000" <#if systemConfig?? && systemConfig.asrcoderate?? && systemConfig.asrcoderate=="16000">selected="selected"</#if>>16KHz</option>
												     </select>
												</div>	
											</div>
										</div>
										
										<div class="row asr" style="margin-bottom:20px; <#if systemConfig?? && systemConfig.asr == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>应用APPID</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">语音听写（转写）服务APPID</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="asrappid" value="<#if systemConfig.asrappid?? && systemConfig.asrappid!= ''>${systemConfig.asrappid!''}</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
										<div class="row asr" style="margin-bottom:20px;<#if systemConfig?? && systemConfig.asr == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>应用APPKey</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">语音听写（转写）服务APPKEY</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="asrappkey" value="<#if systemConfig.asrappkey?? && systemConfig.asrappkey!= ''>${systemConfig.asrappkey!''}</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
										
										<div class="row asr" style="margin-bottom:20px;<#if systemConfig?? && systemConfig.asr == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>应用APPSec</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">语音听写（转写）服务APPSec</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="asrappsec" value="<#if systemConfig.asrappsec?? && systemConfig.asrappsec!= ''>${systemConfig.asrappsec!''}</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
									</div>
								</div>
								
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">26、启用UDP语音数据监听服务</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>用于接收Freeswitch语音流，<b style="color:red;">注意：修改UDP信息需要重启应用服务器（Tomcat）</b></p>
												
											</div>
											<div class="col-lg-4" style="text-align:right;position: relative;">
												<input type="checkbox" title="启用" name="udp" lay-filter="udp" value="1" <#if systemConfig.udp>checked="checked"</#if>>
											</div>
										</div>
										
										<div class="row udp" style="margin-top:30px; margin-bottom:20px; <#if systemConfig?? && systemConfig.asr == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>UDP端口范围开始</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">启用UDP语音数据端口监听服务，端口范围开始</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="udpstart" lay-verify="number" value="<#if systemConfig.udpstart??>${systemConfig.udpstart!''}<#else>50000</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
										
										<div class="row udp" style="margin-bottom:20px; <#if systemConfig?? && systemConfig.asr == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>UDP端口范围结束</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">启用UDP语音数据端口监听服务，端口范围结束</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="udpend" lay-verify="number" value="<#if systemConfig.udpend??>${systemConfig.udpend}<#else>50010</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
									</div>
								</div>
								</#if>
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">27、启用安全性</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>用于对敏感数据进行加密以保证数据安全</p>
												
											</div>
											<div class="col-lg-4" style="text-align:right;position: relative;">
												<input type="checkbox" title="启用" name="enablesecurity" lay-filter="enablesecurity" value="1" <#if systemConfig.enablesecurity>checked="checked"</#if>>
											</div>
										</div>
										
										<div class="row enablesecurity" style="margin-top:30px; margin-bottom:20px; <#if systemConfig?? && systemConfig.enablesecurity == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>安全密码</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">用于算法加密解密</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="securitypws" id="securitypws" value="<#if systemConfig.securitypws??>${systemConfig.securitypws!''}<#else>uk</#if>" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
										
										<input type="hidden" name="securityprivatekey" id="securityprivatekey"  value="" >
										<div class="row enablesecurity" style="margin-bottom:20px; <#if systemConfig?? && systemConfig.enablesecurity == false>display: none;</#if>" >
											<div class="col-lg-6">
												<p>公钥</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;"><a class="layui-btn layui-btn-sm" href="javascript:void(0);" id="createkey">生成密钥</a></p>
											</div>
											<div class="col-lg-6" style="text-align:right;">
												<div class="layui-input-block">
													<input type="text" name="securitypublickeyshow" id="securitypublickey" value="" readonly="readonly" autocomplete="off" class="layui-input" >
												</div>	
											</div>
										</div>
									</div>
								</div>
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">28、会话记录对应的语音片段上传路径</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												
											</div>
											<div class="col-lg-4" style="text-align:right;position: relative;">
												<input type="text" name="snippeturl" value="${systemConfig.snippeturl!''}" autocomplete="off" class="layui-input">
											</div>
										</div>
									</div>
								</div>
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">29、通话记录对应的录音上传路径</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												
											</div>
											<div class="col-lg-4" style="text-align:right;position: relative;">
												<input type="text" name="recordurl" value="${systemConfig.recordurl!''}" autocomplete="off" class="layui-input">
											</div>
										</div>
									</div>
								</div>
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">30、是否启用语音通话记录转储</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>启用语音通话记录转储需要同时这种转储保留时间和任务启动、结束时间</p>
												
											</div>
											<div class="col-lg-4" style="text-align:right;position: relative;">
												<input type="checkbox" title="启用" name="dumpcall" lay-filter="dumpcall" value="1" <#if systemConfig.dumpcall>checked="checked"</#if>>
											</div>
										</div>
										
										<div class="row dumpcall" style="margin-top:30px; margin-bottom:20px; <#if systemConfig?? && systemConfig.dumpcall == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>记录保留时间（天）</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">转储后再最近通话中保留的通话记录天数</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
													<select name="dumpcalldays">
														<#list 1..10 as days>
														<option value="${days}" <#if systemConfig.dumpcalldays == days>selected="selected"</#if>>${days}天</option>
														</#list>
													</select>
												</div>	
											</div>
										</div>
										
										<div class="row dumpcall" style="margin-bottom:20px; <#if systemConfig?? && systemConfig.dumpcall == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>转储任务开始执行时间</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">转储任务应尽量安排在空闲时段执行，例如 00点~06点之间</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-inline" style="width: 80px;">
												    <select name="dumpstarthour">
														<#list 0..23 as hour>
														<option value="${hour}" <#if systemConfig.dumpstarthour == hour>selected="selected"</#if>>${hour}时</option>
														</#list>
													</select>
												</div>	
												<div class="layui-inline" style="width: 30px;text-align:center;">:</div>
												<div class="layui-inline" style="width: 80px;">
												    <select name="dumpstartmin">
														<#list 0..59 as minute>
														<option value="${minute}" <#if systemConfig.dumpstartmin == minute>selected="selected"</#if>>${minute}分</option>
														</#list>
													</select>
												</div>	
											</div>
										</div>
										
										<div class="row dumpcall" style="margin-bottom:20px; <#if systemConfig?? && systemConfig.dumpcall == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>转储任务结束时间</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">转储任务到达结束时间以后，任务自动停止</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-inline" style="width: 80px;">
												    <select name="dumpendhour">
														<#list 0..23 as endhour>
														<option value="${endhour}" <#if systemConfig.dumpendhour == endhour>selected="selected"</#if>>${endhour}时</option>
														</#list>
													</select>
												</div>	
												<div class="layui-inline" style="width: 30px;text-align:center;">:</div>
												<div class="layui-inline" style="width: 80px;">
												    <select name="dumpendmin">
														<#list 0..59 as endminute>
														<option value="${endminute}" <#if systemConfig.dumpendmin == endminute>selected="selected"</#if>>${endminute}分</option>
														</#list>
													</select>
												</div>	
											</div>
										</div>
										<div class="row dumpcall" style="margin-bottom:20px; <#if systemConfig?? && systemConfig.dumpcall == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>归档所有未接通通话记录</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">包含全部未接通数据数据，包含当天的未接通数据</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<input type="checkbox" title="启用" name="dumpnoanswer" value="1" <#if systemConfig.dumpnoanswer>checked="checked"</#if>>	
											</div>
										</div>
										<#if dumpcall?? && dumpcall == true>
										<div class="row dumpcall" style="margin-bottom:20px; <#if systemConfig?? && systemConfig.dumpcall == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>转储进度完成百分比</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">剩余转储记录总数：${dumpcalltotal!''}，已完成转储记录数：${dumpcallfinish!''}</p>
											</div>
											<div class="col-lg-4" style="text-align:right;font-size:40px;">
												<#if dumpcalltotal?? && (dumpcallfinish + dumpcalltotal) gt 0>${(dumpcallfinish/(dumpcallfinish + dumpcalltotal))?string("##.##%")}</#if>	
											</div>
										</div>
										</#if>
									</div>
								</div>
								<div class="ukefu-webim-prop">
									<div class="ukefu-webim-tl" style="clear:both;">31、启用单点登录认证</div>
									<div class="box-item">
										<div class="row">
											<div class="col-lg-8">
												<p>作为第三方业务系统利用此Token向统一认证平台验证是否有效</p>
												
											</div>
											<div class="col-lg-4" style="text-align:right;position: relative;">
												<input type="checkbox" title="启用" name="enablessocheck" lay-filter="enablessocheck" value="1" <#if systemConfig.enablessocheck>checked="checked"</#if>>
											</div>
										</div>
										
										<div class="row enablessocheck" style="margin-top:30px; margin-bottom:20px; <#if systemConfig?? && systemConfig.enablessocheck == false>display: none;</#if>" >
											<div class="col-lg-8">
												<p>认证接口</p>
												<p style="color:#888888;font-size:13px;margin-top:10px;">传入Token字段调用此接口进行用户身份认证</p>
											</div>
											<div class="col-lg-4" style="text-align:right;">
												<div class="layui-input-block">
												     <input type="text" name="ssocheckurl" value="${systemConfig.ssocheckurl!''}" autocomplete="off" class="layui-input">
												</div>	
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col-md-4">
								<div class="ukefu-im-preview ukefu-im-preview-dialog" id="pv" style="width:380px;position: fixed;background-color:#e6e6e6;">
									<div class="ukefu-im-preview-bar ukefu-theme-color <#if systemConfig?? && systemConfig.theme?? && systemConfig.theme == '01'>ukefu-system-theme1</#if><#if systemConfig?? && systemConfig.theme?? && systemConfig.theme == '02'>ukefu-system-theme2</#if><#if systemConfig?? && systemConfig.theme?? && systemConfig.theme == '03'>ukefu-system-theme3</#if>" style="padding:5px;" id="ukefu-sys-preview">
										
										<img src="/images/logo.png" style="height:22px;float:left;">
									
									</div>
									<div class="ukefu-im-preview-menu"></div>
									<div class="ukefu-im-preview-top">
										<ul class="layui-tab-title">
											<li lay-id="maincontent" class="ukefu-home"><i class="kfont" style="position: relative;"></i> 首页</li>
											<li lay-id="admin" class="layui-this">系统管理</li>
											<li lay-id="multiMediaDialogWin" class="">坐席对话</li>
										</ul>
									</div>
									<div class="ukefu-im-preview-left"></div>
									<div class="ukefu-im-preview-right"></div>
								</div>
							</div>
						</div>
					</div>
				</div>
				
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-lg-3"></div>
		<div class="col-lg-9">
			<div class="layui-form-item">
			  <div class="layui-input-block">
				<button class="layui-btn" lay-submit="" lay-filter="formDemo">保存</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			  </div>
			</div>
		</div>
	</div>
</form>

<script language="javascript"> 	
	<#if execute?? && execute == "false">
	top.layer.alert('二次 验证密码设置失败，输入的密码错误，请重新操作！', {icon: 2});
	</#if>
	<#if msg??>
		<#if msg == '1'>
			top.layer.alert('二次验证密码设置成功', {icon: 1});
		<#elseif msg == '2'>
			top.layer.alert('二次验证密码设置失败，请确认两次输入的密码一致', {icon: 2});
		<#elseif msg == '3'>
			top.layer.alert('二次验证密码设置失败，旧的密码验证失败，请输入正确的密码', {icon: 2});
		</#if>
	</#if>
	layui.use('form', function(){
		var form = layui.form;
		form.render('select'); //刷新select选择框渲染
		form.on("checkbox(enablessl)" , function(data){
			if(data.elem.checked == true){
				$('.httpsconfig').show();
			}else{
				$('.httpsconfig').hide();
			}
		})
		form.on("checkbox(enable)" , function(data){
			if(data.elem.checked == true){
				$('.elablesec').show();
			}else{
				$('.elablesec').hide();
			}
		})
		form.on("checkbox(callcenter)" , function(data){
			if(data.elem.checked == true){
				$('#callcenter').show();		
			}else{
				$('#callcenter').hide();
			}
		});
		form.on("checkbox(email)" , function(data){
			if(data.elem.checked == true){
				$('#email').show();		
			}else{
				$('#email').hide();
			}
		});
		form.on("checkbox(sms)" , function(data){
			if(data.elem.checked == true){
				$('#sms').show();		
			}else{
				$('#sms').hide();
			}
		});
		form.on("checkbox(tenant)" , function(data){
			if(data.elem.checked == true){
				$('#tenant').show();		
			}else{
				$('#tenant').hide();
			}
		});
		form.on("checkbox(asr)" , function(data){
			if(data.elem.checked == true){
				$('.asr').show();
			}else{
				$('.asr').hide();
			}
		})
		form.on("checkbox(udp)" , function(data){
			if(data.elem.checked == true){
				$('.udp').show();
			}else{
				$('.udp').hide();
			}
		})
		form.on("checkbox(dumpcall)" , function(data){
			if(data.elem.checked == true){
				$('.dumpcall').show();
			}else{
				$('.dumpcall').hide();
			}
		})
		form.on("checkbox(enablesecurity)" , function(data){
			if(data.elem.checked == true){
				$('.enablesecurity').show();
			}else{
				$('.enablesecurity').hide();
			}
		})
		form.verify({
			pass:function(value){
				if(value != $('#password').val()){
					return "请确认两次输入密码相同" ;
				}
			}
		});    
		
		form.on("checkbox(channelshare)" , function(data){
			if(data.elem.checked == true){
				$('#channelshare_tip').show();		
			}else{
				$('#channelshare_tip').hide();
			}
		});
		
		form.on("checkbox(enablereqlogwarning)" , function(data){
			if(data.elem.checked == true){
				$('#enablereqlogwarning').show();		
			}else{
				$('#enablereqlogwarning').hide();
			}
		});
		form.on("checkbox(enablessocheck)" , function(data){
			if(data.elem.checked == true){
				$('.enablessocheck').show();		
			}else{
				$('.enablessocheck').hide();
			}
		});
		
		 form.on('select(warnlv)', function(data){
		   var areaId=data.value;
		   $.ajax({
                 type: 'POST',
                 url: '/res/diclist.html',
                 data: {id:areaId},
                 dataType:  'json',
                 success: function(data){
                 $("#warn").html("");
                   $.each(data, function(key, val) {
                 var option1 = $("<option>").val(val.id).text(val.name);
                             $("#warn").append(option1);
                             form.render('select');
                         }); 
               $("#warn").get(0).selectedIndex=0;
                 }
         	});
		 });
		
		 form.on('select(ttsservice)', function(data){
			 var ts=data.value;
			 if(ts=='xunfei'){
				 $(".xunfeitts").show();
				 $(".xunfeitts").show();
			 }else if(ts=='baidu'){
				 
				 
				 $(".xunfeitts").hide();
				 $(".xunfeitts").hide();
			 }else if(ts=='aliyun'){
				 
				 
				 $(".xunfeitts").hide();
				 $(".xunfeitts").hide();
			 }else if(ts=='tencent'){
				 
				 
				 $(".xunfeitts").hide();
				 $(".xunfeitts").hide();
			 }else{
				 
				 
				 $(".xunfeitts").hide();
				 $(".xunfeitts").hide();
			 }
		 });
		 $("#addnum").click(function(){
				$("#numsmshead").show();
				var addstr = '<div class="row col-lg-12 numrow">';
				addstr += '<div class="col-lg-3" ><div class="layui-input-block"><input type="text" name="numbers" lay-verify="number" value="" autocomplete="off" class="layui-input" style="width:180px;float: left;"><a href="javascript:void(0)" class="delnums" style="float: right;"><i class="layui-icon" style="color:red;font-size: 21px;line-height: 36px;">&#xe640;</i></a></div></div>';
				addstr += '<div class="col-lg-3" ><div class="layui-input-block"><select name="numsmshugup"><option value="">请选择通话挂机短信模板...</option><#if hugupSmsList??><#list hugupSmsList as smshugup><option value="${smshugup.id!''}" >${smshugup.name!''}</option></#list></#if></select></div></div>';
				addstr +='<div class="col-lg-3" ><div class="layui-input-block"><select name="numnoanswer"><option value="">请选择呼入未接听短信模板...</option><#if callInSmsList??><#list callInSmsList as noanswer><option value="${noanswer.id!''}" >${noanswer.name!''}</option></#list></#if></select></div></div>';
				addstr +='<div class="col-lg-3" ><div class="layui-input-block"><select name="numsmsorgnoanswer"><option value="">请选择呼出未接听短信模板...</option><#if callOutSmsList??><#list callOutSmsList as smsorgnoanswer><option value="${smsorgnoanswer.id!''}" >${smsorgnoanswer.name!''}</option></#list></#if></select></div></div>';
				addstr +='</div>';
				$("#numsms").append(addstr);
				form.render();
			});
	});
	
	$(function(){
		$("#reqlogwarningtouser").select2({
			language:'zh-CN',
			placeholder:"请选择用户",
			ajax:{
				url:"/res/users.html",
				dataType: 'json',
				delay: 250,
				processResults: function (data, params) {
					return {
						results: data
					};
				}    
			}
		});
		
		$('#warnlv').change(function(){
			loadURL('/res/dic.html?id='+$(this).val()+"&name=warn&attr=lay-ignore&style=display:inline-block;" , '#warn');
		})
		
		$('#warnadd').on("click" , function(){
			var msg = "";
			var actiontext ="" ;
			
			if($("#warnlv").val()==null || $("#warnlv").val()==""){
				msg += " 预警级别";
			}
			if($("#warn").val()==null || $("#warn").val()==""){
				msg += " 预警类型";
			}
			var warnaction ="" ;
			$('input[name="warnaction"]:checked').each(function(index,element) {
				if(index==0){
					warnaction +=$(this).val();
					actiontext +=$(this).attr("title");
				}else{
					warnaction +=","+$(this).val();
					actiontext +="、"+$(this).attr("title");
				}
			 });
			/* if(warnaction==''){
				msg += " 拦截动作";
			} */
			var repe = false ;
			$("input[name='reqlogwarningaction']").each(function(index,element) {
				if($(this).attr("data-warn")==$("#warn").val()){
					repe = true ;
				}
			});
			if(repe){
				top.layer.alert("该预警已经有拦截动作，请删除已有拦截动作再进行添加！", {icon: 2});
			}else{
				if(msg ==''){
					if(actiontext==''){
						actiontext = "仅预警";
					}
					var data = $("#warn").val()+":"+warnaction;
					var text = $("#warn option:selected").text()+ "：" +actiontext  ;
					var color = $("#warnlv option:selected").attr("data-color");
					$("#actwarn").append('<small class="ukefu-timerange layui-btn" style="background-color:'+color+'!important">'
										+text
										+'<i class="layui-icon">&#x1006;</i>'
										+'<input type="hidden" name="reqlogwarningaction" data-warn="'+$("#warn").val()+'" value="'+data+'"/>'
										+'</small>');
				}else{
					top.layer.alert('请选择'+msg+"!", {icon: 2});
				}
			}
		})
		
		$(document).on("click" , ".ukefu-timerange", function(){
			var target = $(this);
			var index = top.layer.confirm("请确认是否移除拦截动作？", {icon: 3, title:'提示'}, function(text, cindex){
				top.layer.close(index);
				$(target).remove() ;
			});
			
		});
		
		$(document).on("click" , "#createkey", function(){
			 $.ajax({
                 type: 'POST',
                 url: '/admin/config/createkey.html',
                 data: {securitypws:$("#securitypws").val()},
                 dataType:  'json',
                 success: function(data){
	 				$("#securitypublickey").val(data.pubKey);
	 				$("#securityprivatekey").val(data.priKey);
                 }
         	});
		});
		
		$(document).on("click",".delnums",function(){
	  		$(this).closest(".numrow").remove();
	  		if($(".numrow").length==0){
	  			$("#numsmshead").hide();
	  		}
	    });
	});
</script>